package ast;

import compiler.OutputFormatter;

public class FunctionCall extends Expression {
	
	private Function function;
	private ExpressionList args;
	
	public FunctionCall(Function function, ExpressionList args) {
		this.function = function;
		this.args = args;
	}
	
	public Type getFunctionType() {
		return function.getType();
	}
	
	@Override
	public void genC(OutputFormatter of) {
		of.output(function.getName());
		of.output("(");
		args.genC(of);
		of.output(")");
	}
}
